package com.xzq.erp.controller;


import com.xzq.erp.aspect.ApiOperationLog;
import com.xzq.erp.domain.vo.WarehouseStockRecordVO;
import com.xzq.erp.service.IWarehouseStockRecordService;
import com.xzq.erp.utils.Response;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 仓库出入库记录表 前端控制器
 * </p>
 *
 * @author xzq
 * @since 2025-06-04
 */
@RestController
@RequestMapping("/warehouse-stock-record")
@Tag(name = "仓库出入库记录接口")
@RequiredArgsConstructor
@Slf4j
public class WarehouseStockRecordController {

    private final IWarehouseStockRecordService warehouseStockRecordService;

    @GetMapping("/warehouse/{id}")
    @Operation(summary = "查询仓库出入库记录")
    @ApiOperationLog(description = "查询仓库出入库记录")
    public Response<List<WarehouseStockRecordVO>> getWarehouseStockRecord(@PathVariable Long id) {
        return Response.success(warehouseStockRecordService.getWarehouseStockRecordById(id));
    }
}
